package com.idealighter.game.roomcard.games.mustniuniu.constant;

/**
 * @ClassName MustNiuNiuAdvanceOption.
 * @Description 高级选项
 * @date 2018年5月22日 下午6:02:05 .
 */
public enum MustNiuNiuAdvanceOption {
  JOIN_DISABLE(1, "中途禁入"),

  RUB_CARD_DISABLE(2, "禁止搓牌"),

  BET_OTHER(3, "闲家买码"), // 明牌抢庄不含有

  JOKER(4, "王牌癞子"),

  BET_LIMIT(5, "下注限制"),

  BLIND_CALL_BANKER(6, "暗枪庄家"),

  BET_MULTIPLE(7, "下注加倍");

  public final int id;
  public final String name;

  private MustNiuNiuAdvanceOption(int id, String name) {
    this.id = id;
    this.name = name;
  }

  /**
   * @Title getById.
   * @Description 根据编号获取高级选项
   * @date 2018年6月14日 下午4:06:59
   * @param id .
   * @return .
   */
  public static MustNiuNiuAdvanceOption getById(int id) {
    MustNiuNiuAdvanceOption result = null;
    for (MustNiuNiuAdvanceOption item : MustNiuNiuAdvanceOption.values()) {
      if (item.id == id) {
        result = item;
        break;
      }
    }
    return result;
  }
}
